/***********************************************************************************
 * 文件名： mcu_ble.h
 * 作者： 刘言
 * 版本： 1
 * 说明：
 * 		BLE 抽象层，统一BLE访问接口。
 * 修改记录：
 * 	2022/10/28: 初版。 刘言。
***********************************************************************************/
#ifndef _MCU_BLE_H_
#define _MCU_BLE_H_

#include "..\ARM\typedef.h"

typedef enum _ble_gap_ev
{
    BLE_GAP_ST_INIT,
    BLE_GAP_ST_STARTED,             // GAP开始工作,但未开启广播
    BLE_GAP_ST_ADVERTISING,         // 正在广播
    BLE_GAP_ST_WAITING,                        //!< Device is started but not advertising, is in waiting period before advertising again
    BLE_GAP_ST_WAITING_AFTER_TIMEOUT,          //!< Device just timed out from a connection but is not yet advertising, is in waiting period before advertising again
    BLE_GAP_ST_CONNECTED,                      //!< In a connection
    BLE_GAP_ST_CONNECTED_ADV,                  //!< In a connection + advertising
    BLE_GAP_ST_ERROR                           //!< Error occurred - invalid state
}ble_gap_st_t;


typedef void (*ble_gap_event_cb_t)(ble_gap_st_t e);





void Ble_SetGapEventCb(ble_gap_event_cb_t new_cb);

ble_gap_st_t Ble_GetGapState();

u8 * Ble_GetOwnMac();

u8 * Ble_GetConnMac();

#endif
